package com.kerrykidz.filemanagement.service.impl;

import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.kerrykidz.filemanagement.service.IVisitorService;
import com.kerrykidz.membership.dao.mapper.CusMemEntityMapper;
import com.kerrykidz.membership.dao.mapper.CusMemSalesEntityMapper;
import com.rdp.framework.exception.RDPException;

/**
 * 访客管理服务实现类
 * @author YANAN
 *
 */
@Service
public class VisitorServiceImpl implements IVisitorService {

	private Logger loger = LoggerFactory.getLogger(VisitorServiceImpl.class);
	@Autowired
	private CusMemEntityMapper cusMemEntityMapper;
	@Autowired
	private CusMemSalesEntityMapper cusMemSalesEntityMapper;
	
	/**
	 * 获取访客信息
	 * @return
	 * @throws RDPException 
	 */
	@Override
	public List<Map<String, Object>> viewVistors(String condition,
			String relatedSales) throws RDPException {
		loger.info("viewVistors()");
		return cusMemEntityMapper.listVisitors(condition, relatedSales);
	}

	/**
	 * 获取所有销售信息
	 * @return
	 */
	@Override
	public List<Map<String, Object>> listSales() throws RDPException {
		return cusMemSalesEntityMapper.listSales();
	}

}
